feat(agent-gui): 上下文用量环与手动上下文压缩 - #358
Open
ushaio wants to merge 1 commit into
Open
Conversation
- Show a context usage ring in the composer based on the latest assistant round usage relative to the model context window (GUI + WebUI) - Clicking the ring (usage > 50%) opens a confirm popover to manually compact the current conversation - CompactionController gains compactNow() with a force mode and a "manual" trigger, reusing the existing compaction flow while idle - ConfirmActionPopover description is now optional
Contributor
|
PR governance checks failed.
Fix the items above — pushing new commits or editing the PR body will re-run the checks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #359
Summary
为输入框新增上下文用量环(GUI 与 WebUI),并支持手动上下文压缩:
CompactionController.compactNow()(manual触发、强制模式)复用现有压缩流程,空闲时即可手动压缩;Change scope
crates/agent-gui/src/lib/chat/compaction/controller.ts/types.tscrates/agent-gui/src/pages/chat/components/ChatComposerBar.tsxcrates/agent-gui/src/pages/ChatPage.tsxcrates/agent-gui/src/components/ui/confirm-action-popover.tsxcrates/agent-gui/src/i18n/config.tscrates/agent-gateway/web/src/app/GatewayApp.tsx/pages/chat/ChatComposerBar.tsxScreenshots / preview
待补充(UI 改动,截图稍后追加)。
Verification
pnpm build(agent-gui,tsc + vite build):通过cargo check --manifest-path crates/agent-gui/src-tauri/Cargo.toml --tests:通过tsc --noEmit:通过node scripts/check-mirror.mjs:通过(119 个镜像文件)git diff --check:通过Pre-submit checklist